import axios from '@/libs/api.request'

export class SocialSecurityPayableBillApi {
  // 社保应付账单导入
  static importSocialSecurityPayableBill (params) {
    return axios.request({
      url: '/SocialSecurityPayableBill/ImportSocialSecurityPayableBill',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取社保应付账单列表数据
  static getSocialSecurityPayableBillList (params) {
    return axios.request({
      url: '/SocialSecurityPayableBill/GetSocialSecurityPayableBillList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出社保应付账单
  static exportSocialSecurityPayableBill (params) {
    return axios.request({
      url: '/SocialSecurityPayableBill/ExportSocialSecurityPayableBill',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出实付单-U8
  static exportPayment (params) {
    return axios.request({
      url: '/SocialSecurityPayableBill/ExportPayment',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取保险编号(1-社保 2-公积金 3-商保)
  // static getSecurityNos (type) {
  //   return axios.request({
  //     url: '/SocialSecurityPayableBill/GetSecurityNos?type=' + type,
  //     method: 'post',
  //     enctype: 'multipart/form-data'
  //   })
  // }
  static getSecurityNos (params) {
    return axios.request({
      url: '/SocialSecurityPayableBill/GetSecurityNos',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 导出编号
  static exportSecurityNos (params) {
    return axios.request({
      url: '/SocialSecurityPayableBill/ExportSecurityNos',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 删除
  static delete (params) {
    return axios.request({
      url: '/SocialSecurityPayableBill/Delete',
      method: 'delete',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 校验并获取当前工资总额
  static checkConfirmPay (params) {
    return axios.request({
      url: '/SocialSecurityPayableBill/CheckConfirmPay',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 工资付款确认
  static confirmPay (params) {
    return axios.request({
      url: '/SocialSecurityPayableBill/ConfirmPay',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }
}
